package com.gopay.bis.nbcb.ebank.impl;

import com.gopay.bis.nbcb.ebank.operation.NbcbB2cCertHelperQuery;
import com.gopay.common.domain.bank.BaseMessage;
import com.gopay.common.domain.bank.nbcb.ebank.NbcbB2cMessage;
import com.gopay.common.domain.bank.nbcb.ebank.query.req.NbcbB2cQueryParam;
import com.gopay.common.domain.bank.nbcb.ebank.query.res.NbcbB2cResNetPay;
import com.gopay.common.exception.GopayException;
import com.gopay.remote.bank.ICertHelper;
import com.gopay.remote.bank.businesses.BankService;

public class NbcbB2cBankServiceImpl implements BankService  {
	private ICertHelper nbcbB2cCerthelper;
	private NbcbB2cCertHelperQuery nbcbB2cCerthelperQuery;
	public Object sign(BaseMessage msg) throws GopayException {
		String signMessage = (String) nbcbB2cCerthelper.sign(msg);
		return signMessage;
	}

	public Object verify(BaseMessage msg) throws GopayException {
		NbcbB2cMessage messageB2C = (NbcbB2cMessage)msg;
		return nbcbB2cCerthelper.verify(messageB2C);
	}

	public Object query(Object obj) throws GopayException {
		NbcbB2cQueryParam message = (NbcbB2cQueryParam)obj;
		NbcbB2cResNetPay repMessage= nbcbB2cCerthelperQuery.queryB2C(message);
		return repMessage;
	}

	public void setNbcbB2cCerthelper(ICertHelper nbcbB2cCerthelper) {
		this.nbcbB2cCerthelper = nbcbB2cCerthelper;
	}

	public void setNbcbB2cCerthelperQuery(
			NbcbB2cCertHelperQuery nbcbB2cCerthelperQuery) {
		this.nbcbB2cCerthelperQuery = nbcbB2cCerthelperQuery;
	}

	@Override
	public Object dayend(Object obj) throws GopayException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object refund(Object obj) throws GopayException {
		// TODO Auto-generated method stub
		return null;
	}

}
